home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 June / EnigmA AMIGA RUN 19 (1997)(G.R. Edizioni)(IT)[!][issue 1997-06][EAR-CD III].iso / recent1 / executehack.readme < prev    next >
Text File  |  1997-05-23  |  2KB  |  78 lines

  1. Short:    V1.6 Hack to make Execute recognize #!
  2. Author:   pueschel@imsdd.meb.uni-bonn.de
  3. Uploader: pueschel@imsdd.meb.uni-bonn.de
  4. Type:     util/cli
  5.  
  6. The Execute Hack:
  7.  
  8. This is a little hack that makes the execute command recognize
  9. the #! convention in script files. This means: if a script file
  10. starts with, say "#!/bin/sh", as the first line, my Execute
  11. will run sh as an interpreter on the file. All you have to do
  12. is set the s-flag on the script, and it can be used like other
  13. Amiga-OS scripts.
  14.  
  15. Installation:
  16.  
  17. Rename c:Execute to C:Execute.orig (it is called by my Execute for
  18. amiga shell scripts).
  19. Copy my Execute to c: (it can be made resident, like the original).
  20. That's all :-)
  21.  
  22. Use:
  23.  
  24. Set the s-flag on all sh, csh, perl or whatever-you-use scripts.
  25.  
  26. From version 1.4 on, the path after the #! will be used to find
  27. the script interpreter. If the interpreter is not found that way,
  28. the AmigaOS path will be searched for the interpreter. 
  29.  
  30. A resident version of the interpreter will be used if present; remember
  31. however that it might differ from the one pointed to by the #! line.
  32.  
  33. UNIX style paths will be autoconverted, e.g.:
  34.  
  35. #!/usr/bin/perl
  36.  
  37. and
  38.  
  39. #!usr:bin/perl
  40.  
  41. are equivalent.
  42.  
  43. The complete invocation (e.g. perl -i blabla) is set as CLI command
  44. name.
  45.  
  46. Problems & History:
  47.  
  48. The original Execute apparently does not use ReadArgs(), so my Execute
  49. does not react exactly the same way when an error occurs.
  50.  
  51. The first release did not search for scripts, like the original Execute
  52. does. Fixed.
  53.  
  54. The last component of the search path was ignored. Fixed. Thanks to Gunther
  55. Nikl for the report.
  56.  
  57. AmigaDOS style paths in the #! line, like #!bin:sh, did not work. Fixed.
  58.  
  59. Spaces between #! and interpreter name were not properly ignored. Fixed.
  60.  
  61. The path after #! was ignored. Changed.
  62.  
  63. The resident list was not really searched. Fixed.
  64.  
  65. Oops. Version 43.5 only worked with resident Execute.orig. Fixed.
  66. Thanks to Bert Vortman for the report.
  67.  
  68. OOPS ! Version 43.6 had the same problem with rx ! Path search reinstated
  69. due to popular demand.
  70.  
  71. Legal Stuff:
  72.  
  73. There is no warranty. The program is Freeware.
  74.  
  75. Bug reports & suggestions:
  76.  
  77. Send bug reports & suggestions to pueschel@imsdd.meb.uni-bonn.de.
  78.